<ion-view view-title="绑定银行" cache-view="false">
    <ion-nav-buttons>
        <exit-button></exit-button>
    </ion-nav-buttons>
    <ion-content ng-class="{'has-loading': isOffline}">
        <!-- step -->
        <div class="kProgress">
            <div class="kProgressBar">
                <div class="kProgressBarInner" style="width:90%"><i></i></div>
            </div>
            <div class="kProgressState">80/100</div>
        </div>
        <!-- panel -->
        <div class="kCells noRemind" ng-show="param.step == 1">
            <a ng-click="showBankClick()" digital-keyboard=false ng-click="openModal()" class="kCell">
                <div class="kCellPrimary"><p>选择银行</p></div>
                <div class="kCellExtra" ng-class="{'placeholder':!param.bank_no}" ng-model="param.bank_name">{{param.bank_name}}</div>
            </a>
            <div class="kCell" ng-show="param.step == 1 && param.contract_way != 2">
                <div class="kCellTitle">银行卡号</div>
                <div class="kCellPrimary">
                    <input type="tel" placeholder="请输入银行卡卡号" class="jBankCard" ng-model="param.bank_account" placeholder="请输入银行卡卡号"
                    digital-keyboard=false maxlength="23">
                </div>
            </div>
            <div class="kCell" ng-show="param.step == 1 && param.contract_way != 2 && param.ispwd == 1">
                <div class="kCellTitle">银行密码</div>
                <div class="kCellPrimary">
                    <input type="password" class="jPinpad" ng-model="param.bank_pwd" placeholder="{{param.pwd_msg}}" maxlength="6"
                           digital-keyboard="param.bank_pwd">
                </div>
            </div>
        </div>


        <!--<div class="panel tp" ng-show="param.step == 1">
            <a ng-click="showBankClick()" digital-keyboard=false>
                <div class="item group">
                    <span class="title">选择银行</span>
                    <span ng-class="{'txt_m':true,'placeholder':!param.bank_no}" ng-model="param.bank_name">{{param.bank_name}}</span>
                </div>
            </a>
            <div class="item" ng-show="param.step == 1 && param.contract_way != 2">
                <span class="title">银行卡号</span>
                <input type="tel" class="txt_m jBankCard" ng-model="param.bank_account" placeholder="请输入银行卡卡号"
                       digital-keyboard=false maxlength="23"/>
            </div>
            <div class="item" ng-show="param.step == 1 && param.contract_way != 2 && param.ispwd == 1">
                <span class="title">银行密码</span>
                <input type="password" class="txt_m jPinpad" ng-model="param.bank_pwd" placeholder="{{param.pwd_msg}}" maxlength="6"
                       digital-keyboard="param.bank_pwd"/>
            </div>
        </div>-->
        <div class="kCells tran" ng-show="param.step == 1 && param.bank_no">
            <div class="kCell">
                <input type="checkbox" class="kChk" ng-model="param.agreement">
                <div class="kCellPrimary">我已阅读并同意签署<a href="#/trade/agreement?id={{param.econtract_id}}" ng-click="saveBankInfo()" class="clr2">相关基金协议</a></div>
            </div>
        </div>

        <div class="kRemind" ng-show="param.step == 1 && param.bank_no">
            <div class='clr2' ng-bind-html="param.brief"></div>
            为保证您的银行卡资金安全，现在请您去银联进行身份验证。验证过程中，银行卡密码为中国银联直接加密校验，您不必担心密码外泄。
        </div>

        <!-- panel -->
        <div class="btnbox" ng-show="param.step == 1">
            <a class="btn" ng-click="bindBankClick()">下一步</a>
        </div>
        <!-- panel -->
        <div ng-show="param.step == 2 && !param.bind_success">
            <div class="panel confirm fail">
                <dl>
                    <dt>三方存管银行绑定失败！</dt>
                    <dd ng-bind-html="param.fail_info"></dd>
                </dl>
            </div>
            <!-- button -->
            <div class="btnbox" id="">
                <a class="btn" ng-click="reBind()">重新指定存管银行</a>
            </div>
        </div>
    </ion-content>
    <div class="service-tel">客服电话：400 - 800 - 5000</div>
</ion-view>